import Vue from "vue";
import VueRouter from "vue-router";
const Main = () => import('../components/Main.vue')
const Scene = () => import('../components/Scene.vue')

Vue.use(VueRouter);
const VueRouterPush = VueRouter.prototype.push
VueRouter.prototype.push = function push(to) {
  return VueRouterPush.call(this, to).catch(err => err)
}

const routes = [
  { path: '/', redirect: '/main' },
  { path: '/main', component: Main },
  { path: '/threejs', component: Scene }
]
const router = new VueRouter({
  routes
})
export default router